#ifndef AFX_CMENU_H
#define AFX_CMENU_H

#include <windows.h>
#include <commctrl.h>
#include <uxtheme.h>

class CMenu {
  private:
    HMENU m_hMenu;
  public:
    CMenu();
    void SetHandle(HMENU hMenu);
    HMENU GetHandle();
    HMENU GetSubMenu(int nPos);
    HMENU Create();
    HMENU Create(LPCTSTR lpMenuName);
    HMENU Create(UINT nIDTemplate);
    HMENU CreatePopup();
    BOOL Destroy();
    BOOL SetInfo(LPMENUINFO lpcmi);
    BOOL GetInfo(LPMENUINFO lpcmi);
    BOOL AppendMenu(UINT nFlags, UINT_PTR nIDNewItem, LPCTSTR lpNewItem);
    BOOL InsertMenu(UINT nPosition, UINT nFlags, UINT_PTR nIDNewItem,
        LPCTSTR lpNewItem);
    BOOL InsertItem(UINT nItem, BOOL bByPosition, LPCMENUITEMINFO lpmii);
    BOOL ModifyItem(UINT nPosition, UINT nFlags, UINT_PTR nIDNewItem,
        LPCTSTR lpNewItem);
    UINT GetItemCount();
    UINT GetItemID(int nPos);
    UINT GetState(UINT nIDItem, UINT nFlags);
    UINT GetString(UINT nIDItem, LPSTR lpString, int nMaxCount, UINT nFlag);
    BOOL SetItemInfo(UINT nItem, BOOL bByPos, LPMENUITEMINFO lpmii);
    BOOL GetItemInfo(UINT nItem, BOOL bByPos, LPMENUITEMINFO lpmii);
    BOOL EnableItem(UINT nIDEnableItem, UINT nEnable);
    BOOL SetItemBitmaps(UINT nPosition, UINT nFlags, HBITMAP hBmpUnchecked,
        HBITMAP hBmpChecked);
    DWORD CheckItem(UINT nIDCheckItem, UINT nCheck);
    BOOL CheckRadioItem(UINT idFirst, UINT idLast, UINT idCheck, UINT nFlags);
    BOOL SetDefaultItem(UINT nItem, BOOL bByPosition);
    UINT GetDefaultItem(BOOL bByPos, UINT nFlags);
    BOOL RemoveItem(UINT nPosition, UINT nFlags);
    BOOL DeleteItem(UINT nPosition, UINT nFlags);
    BOOL TrackPopup(UINT nFlags, int x, int y, HWND hWnd);
    BOOL TrackPopupEx(UINT nFlags, int x, int y, HWND hWnd, LPTPMPARAMS lptpm);
};

#endif // AFX_CMENU_H
